package com.hqyj.util;

/**
 * @Author: cj
 * @Date: 2020/9/3 10:48
 * @Version: 1.0
 */
public class FileNameUtils {
    public static String getSuffix(String fileName){
        return fileName.substring(fileName.lastIndexOf("."));
    }

    /**
     * 生成新的文件名
     * @param fileOriginName 源文件名
     * @return
     */
    public static String getFileName(String fileOriginName){
        return UUIDUtils.getUUID() + FileNameUtils.getSuffix(fileOriginName);
    }
}
